<?php

/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */

/**
 * Description of Photo
 *
 * @author sirine
 */
class Photo extends AppModel {

    var $name = 'Photo';
    
    public $validate = array(
        //les 2 champs du formulaire ne doivent pas être vides 
        'url_PHOTO' => array(
            'rule' => array('extension', array( 'jpeg', 'jpg')),
            'allowEmpty' => false,
            'required' => true,
            'message' => 'Merci de soumettre une image valide de type : .jpeg ou  .jpg.'
        ),
        'tags_PHOTO' => array(
            'alphaNumeric' => array(
                'rule' => 'notEmpty',
                'allowEmpty' => false,
                'required' => true,
                'message' => 'Chiffres et lettres uniquement !'
            )
        )
    );

}
